package com.zhuiyun.project.api.poetryAuthor.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Description TODO 作者模型类
 * @Author shy
 * @Date 2023/12/11 8:52
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("作者模型")
public class PoetryAuthorModel {
    /*
    id
     */
    @ApiModelProperty("作者id")
    private Integer authorId;
    /*
    作者名
     */
    @ApiModelProperty("作者名")
    @NotBlank
    private String authorName;
    /*
    作者简介
     */
    @ApiModelProperty("作者简介")
    @NotBlank
    private String authorIntroduction;
    /*
    所属朝代
     */
    @ApiModelProperty("所属朝代")
    @NotNull
    private Integer authorDynasty;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss" )//DateTimeFormat 是入参格式化；
    private Date creationTime;
    @ApiModelProperty("修改时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss" )//DateTimeFormat 是入参格式化；
    private Date updateTime;
}